package com.baidu.mpks.usergroup.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class UserGroup {

    private Integer id;
    private String name;
    private Integer parentId;
    private String type;
    private String description;
    private Integer edit;
    private Integer delete;
    private String createBy;
    private String updateBy;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date updateTime;

    public UserGroup(String userId) {
        this.setCreateBy(userId);
        this.setUpdateBy(userId);
    }

    public UserGroup() {
    }
}
